package com.study.manage.web;

import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Date;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("/")
@Slf4j
public class IndexController {

	@RequestMapping("/index")
	public String index() {
		log.debug("-------------index------------");
		return "index";
	}

	@RequestMapping("/home")
	public String toHome() {
		log.debug("-------------home------------");
		return "home";
	}
	
	@RequestMapping("/login")
	public String toLogin() {
		log.debug("-------------login------------");
		return "login";
	}

	@RequestMapping("/{page}")
	public String toPage(@PathVariable("page") String page) {
		System.out.println("page: " + page);
		log.debug("-------------toindex------------" + page);
		return page;
	}
}
